import { MinPriorityQueue } from '@datastructures-js/priority-queue'

type Action = () => void

export class Event {
  constructor(
    public time: number,
    public action: Action,
    public description: string = ''
  ) {}
}

export const eventQueue = new MinPriorityQueue<Event>({
  compare: (a, b) => a.time - b.time
})
